package phapp.model.custom;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;

/**
 * Title: t_attention_data 数据类 POJO Description: DAO层映射到数据类,页面封装数据映射到数据类
 * Copyright: Copyright (c) 2012-10 Company:
 * 
 * @author you name
 * @version 1.0
 */

public class Attention extends BaseEntity
{

   // date formats
   public static final String FORMAT_CREATE_DATE = DATE_TIME_FORMAT;

   /** dataId */
   private java.lang.Integer dataId;
   /** custId */
   private java.lang.Integer custId;
   /** attentionCustid */
   private java.lang.Integer attentionCustid;
   /** attentionStatus */
   private java.lang.Integer attentionStatus;
   /** createDate */
   private java.sql.Timestamp createDate;

   private java.util.ArrayList idList;

   private java.lang.String custName;
   private java.lang.String objectImgurl;
   private java.lang.String attentionCustName;
   

   public Attention()
   {
   }

   public java.lang.String getCustName()
   {
      return custName;
   }

   public void setCustName(java.lang.String custName)
   {
      this.custName = custName;
   }

   public java.lang.String getObjectImgurl()
   {
      return objectImgurl;
   }

   public void setObjectImgurl(java.lang.String objectImgurl)
   {
      this.objectImgurl = objectImgurl;
   }

   public java.lang.String getAttentionCustName()
   {
      return attentionCustName;
   }

   public void setAttentionCustName(java.lang.String attentionCustName)
   {
      this.attentionCustName = attentionCustName;
   }

   public Attention(java.lang.Integer dataId)
   {
      this.dataId = dataId;
   }
   
   public void setId(java.lang.Integer value)
   {
      this.dataId = value;
   }

   public java.lang.Integer getId()
   {
      return this.dataId;
   }

   public void setDataId(java.lang.Integer value)
   {
      this.dataId = value;
   }

   public java.lang.Integer getDataId()
   {
      return this.dataId;
   }

   public void setCustId(java.lang.Integer value)
   {
      this.custId = value;
   }

   public java.lang.Integer getCustId()
   {
      return this.custId;
   }

   public void setAttentionCustid(java.lang.Integer value)
   {
      this.attentionCustid = value;
   }

   public java.lang.Integer getAttentionCustid()
   {
      return this.attentionCustid;
   }

   public void setAttentionStatus(java.lang.Integer value)
   {
      this.attentionStatus = value;
   }

   public java.lang.Integer getAttentionStatus()
   {
      return this.attentionStatus;
   }

   public String getCreateDateString()
   {
      return date2String(getCreateDate(), FORMAT_CREATE_DATE);
   }

   public void setCreateDateString(String value)
   {
      setCreateDate(string2Date(value, FORMAT_CREATE_DATE, java.sql.Timestamp.class));
   }

   public void setCreateDate(java.sql.Timestamp value)
   {
      this.createDate = value;
   }

   public java.sql.Timestamp getCreateDate()
   {
      return this.createDate;
   }

   public java.util.ArrayList getIdList()
   {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList)
   {
      this.idList = idList;
   }

   /** 手动增加属性后,toString,hashCode,equals都要修改 */
   public String toString()
   {
      return new ToStringBuilder(this).append("DataId", getDataId()).append("CustId", getCustId())
               .append("AttentionCustid", getAttentionCustid()).append("AttentionStatus", getAttentionStatus())
               .append("CreateDate", getCreateDate()).toString();
   }

   public int hashCode()
   {
      return new HashCodeBuilder().append(getDataId()).append(getCustId()).append(getAttentionCustid())
               .append(getAttentionStatus()).append(getCreateDate()).toHashCode();
   }

   public boolean equals(Object obj)
   {
      if(obj instanceof Attention == false) return false;
      if(this == obj) return true;
      Attention other = (Attention) obj;
      return new EqualsBuilder().append(getDataId(), other.getDataId()).append(getCustId(), other.getCustId())
               .append(getAttentionCustid(), other.getAttentionCustid())
               .append(getAttentionStatus(), other.getAttentionStatus()).append(getCreateDate(), other.getCreateDate())
               .isEquals();
   }
}
